
package com.the9tcat.everydayapp.widget;

import com.the9tcat.everydayapp.AppService;

import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.Context;
import android.content.Intent;

public class AppWidgetLarge extends AppWidgetProvider {
    
    @Override
    public void onUpdate(final Context context,
            final AppWidgetManager appWidgetManager, final int[] appWidgetIds) {
        super.onUpdate(context, appWidgetManager, appWidgetIds);
        context.startService(new Intent(context, AppService.class));
//        int len = appWidgetIds.length;
//        for (int i = 0; i < len; i++) {
//            RemoteViews views = new RemoteViews(context
//                    .getPackageName(), R.layout.widget_large_layout);
//            Intent in = new Intent(context, AppDetailActivity.class);
//            PendingIntent pi = PendingIntent
//                    .getActivity(context, 0, in,
//                                 PendingIntent.FLAG_UPDATE_CURRENT);
//            views.setOnClickPendingIntent(R.id.go, pi);
//            Intent intent = new Intent(context, AppService.class);
//            PendingIntent pi2 = PendingIntent
//            .getService(context, 0, intent,
//                         PendingIntent.FLAG_UPDATE_CURRENT);
//            views.setOnClickPendingIntent(R.id.layout, pi2);
//            appWidgetManager.updateAppWidget(appWidgetIds[i], views);
//        }
    }
    
    @Override
    public void onDeleted(Context context, int[] appWidgetIds) {
        super.onDeleted(context, appWidgetIds);
    }

    @Override
    public void onDisabled(Context context) {
        super.onDisabled(context);
    }

    @Override
    public void onEnabled(Context context) {
        super.onEnabled(context);
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        super.onReceive(context, intent);
    }
}
